package com.example.wujinapi.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.example.wujinapi.comm.R;
import com.example.wujinapi.entity.Users;

import java.util.List;

/**
 * (Users)表服务接口
 *
 * @author makejava
 * @since 2024-03-25 02:24:50
 */
public interface UsersService extends IService<Users> {
    void addUser(Users users);
    void updateUserByOpenid(Users users);
    void updateUserByUserId(Users users);
    Users readUserById(int id);
    Users readUserByOpenid(String openid);
    List<Users> getUsers();
    /*@MapKey("id")
    List<Map<String,Object>> getNews(int pageNum, int pageSize);*/
    /**
     * 小程序解密
     *
     * @param token         token，根据token获取sessionKey
     * @param encryptedData 密文
     * @param iv            初始向量
     * @return {@link R}
     */
    R wxDecryptPhone(String token, String encryptedData, String iv) throws Exception;
}

